def checkPwd(pwd):
    if len(pwd)<8:
        return "密码至少有8个字符"
    if pwd.isalnum()==False:
        return "密码只能包含英文字母和数字"
    count = 0
    for c in pwd:
        if '0'<=c and c<='9':
            count += 1
    if count<=1:
        return "密码至少包含两个数字"
    return "密码合法"

def main():
    pwd = input("输入密码：")
    print(checkPwd(pwd))

main()